Integrand size = 22, antiderivative size = 55 \[ \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )} \, dx=-\frac {c^2}{a x}+\frac {d^2 x}{b}-\frac {(b c-a d)^2 \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} b^{3/2}} \]
[Out]
Time = 0.03 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {472, 211} \[ \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )} \, dx=-\frac {\arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) (b c-a d)^2}{a^{3/2} b^{3/2}}-\frac {c^2}{a x}+\frac {d^2 x}{b} \]
[In]
[Out]
Rule 211
Rule 472
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {d^2}{b}+\frac {c^2}{a x^2}-\frac {(-b c+a d)^2}{a b \left (a+b x^2\right )}\right ) \, dx \\ & = -\frac {c^2}{a x}+\frac {d^2 x}{b}-\frac {(b c-a d)^2 \int \frac {1}{a+b x^2} \, dx}{a b} \\ & = -\frac {c^2}{a x}+\frac {d^2 x}{b}-\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} b^{3/2}} \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00 \[ \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )} \, dx=-\frac {c^2}{a x}+\frac {d^2 x}{b}-\frac {(-b c+a d)^2 \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} b^{3/2}} \]
[In]
[Out]
Time = 2.67 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.18
method | result | size |
default | \(\frac {d^{2} x}{b}+\frac {\left (-a^{2} d^{2}+2 a b c d -b^{2} c^{2}\right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{b a \sqrt {a b}}-\frac {c^{2}}{a x}\) | \(65\) |
risch | \(\frac {d^{2} x}{b}-\frac {c^{2}}{a x}-\frac {a \ln \left (-\sqrt {-a b}\, x -a \right ) d^{2}}{2 b \sqrt {-a b}}+\frac {\ln \left (-\sqrt {-a b}\, x -a \right ) c d}{\sqrt {-a b}}-\frac {b \ln \left (-\sqrt {-a b}\, x -a \right ) c^{2}}{2 \sqrt {-a b}\, a}+\frac {a \ln \left (-\sqrt {-a b}\, x +a \right ) d^{2}}{2 b \sqrt {-a b}}-\frac {\ln \left (-\sqrt {-a b}\, x +a \right ) c d}{\sqrt {-a b}}+\frac {b \ln \left (-\sqrt {-a b}\, x +a \right ) c^{2}}{2 \sqrt {-a b}\, a}\) | \(178\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 164, normalized size of antiderivative = 2.98 \[ \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )} \, dx=\left [\frac {2 \, a^{2} b d^{2} x^{2} - 2 \, a b^{2} c^{2} - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-a b} x \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right )}{2 \, a^{2} b^{2} x}, \frac {a^{2} b d^{2} x^{2} - a b^{2} c^{2} - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {a b} x \arctan \left (\frac {\sqrt {a b} x}{a}\right )}{a^{2} b^{2} x}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 165 vs. \(2 (44) = 88\).
Time = 0.30 (sec) , antiderivative size = 165, normalized size of antiderivative = 3.00 \[ \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )} \, dx=\frac {\sqrt {- \frac {1}{a^{3} b^{3}}} \left (a d - b c\right )^{2} \log {\left (- \frac {a^{2} b \sqrt {- \frac {1}{a^{3} b^{3}}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} - \frac {\sqrt {- \frac {1}{a^{3} b^{3}}} \left (a d - b c\right )^{2} \log {\left (\frac {a^{2} b \sqrt {- \frac {1}{a^{3} b^{3}}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {d^{2} x}{b} - \frac {c^{2}}{a x} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.15 \[ \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )} \, dx=\frac {d^{2} x}{b} - \frac {c^{2}}{a x} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a b} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.15 \[ \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )} \, dx=\frac {d^{2} x}{b} - \frac {c^{2}}{a x} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a b} \]
[In]
[Out]
Time = 0.08 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.45 \[ \int \frac {\left (c+d x^2\right )^2}{x^2 \left (a+b x^2\right )} \, dx=\frac {d^2\,x}{b}-\frac {c^2}{a\,x}-\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x\,{\left (a\,d-b\,c\right )}^2}{\sqrt {a}\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}\right )\,{\left (a\,d-b\,c\right )}^2}{a^{3/2}\,b^{3/2}} \]
[In]
[Out]